#define LOG_TAG "TCAM_HAL.SERVICE"

#include <android-base/logging.h>
#include <hidl/HidlTransportSupport.h>
#include "Tcam.h"

using namespace android;
using android::hardware::configureRpcThreadpool;
using android::hardware::joinRpcThreadpool;
using vendor::ecarx::xma::tcam::V1_0::Tcam;

int main(int /* argc */, char** /* argv */) {
    configureRpcThreadpool(4, true);
    //Tcam tcam;
	 sp<Tcam> tcam = new Tcam();
    status_t status = tcam->registerAsService();
    ALOGI("----------> will register tcam service");
    //status_t status = tcam.registerAsService();

    if (status != OK) {
        ALOGI("Unable to register tcam service (%d)", status);
        return 1;
    } else {
        ALOGI("register tcam success");
    }

    joinRpcThreadpool();
    return 1;  // joinRpcThreadpool shouldn't exit
}